package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TBatteryReplacementRecordMapper;
import com.ruoyi.system.domain.TBatteryReplacementRecord;
import com.ruoyi.system.service.ITBatteryReplacementRecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 车辆电池更换记录Service业务层处理
 * 
 * @author wuliuzhen
 * @date 2025-10-01
 */
@Service
public class TBatteryReplacementRecordServiceImpl implements ITBatteryReplacementRecordService 
{
    @Autowired
    private TBatteryReplacementRecordMapper tBatteryReplacementRecordMapper;

    /**
     * 查询车辆电池更换记录
     * 
     * @param id 车辆电池更换记录主键
     * @return 车辆电池更换记录
     */
    @Override
    public TBatteryReplacementRecord selectTBatteryReplacementRecordById(Long id)
    {
        return tBatteryReplacementRecordMapper.selectTBatteryReplacementRecordById(id);
    }

    /**
     * 查询车辆电池更换记录列表
     * 
     * @param tBatteryReplacementRecord 车辆电池更换记录
     * @return 车辆电池更换记录
     */
    @Override
    public List<TBatteryReplacementRecord> selectTBatteryReplacementRecordList(TBatteryReplacementRecord tBatteryReplacementRecord)
    {
        return tBatteryReplacementRecordMapper.selectTBatteryReplacementRecordList(tBatteryReplacementRecord);
    }

    /**
     * 新增车辆电池更换记录
     * 
     * @param tBatteryReplacementRecord 车辆电池更换记录
     * @return 结果
     */
    @Override
    public int insertTBatteryReplacementRecord(TBatteryReplacementRecord tBatteryReplacementRecord)
    {
        return tBatteryReplacementRecordMapper.insertTBatteryReplacementRecord(tBatteryReplacementRecord);
    }

    /**
     * 修改车辆电池更换记录
     * 
     * @param tBatteryReplacementRecord 车辆电池更换记录
     * @return 结果
     */
    @Override
    public int updateTBatteryReplacementRecord(TBatteryReplacementRecord tBatteryReplacementRecord)
    {
        return tBatteryReplacementRecordMapper.updateTBatteryReplacementRecord(tBatteryReplacementRecord);
    }

    /**
     * 批量删除车辆电池更换记录
     * 
     * @param ids 需要删除的车辆电池更换记录主键
     * @return 结果
     */
    @Override
    public int deleteTBatteryReplacementRecordByIds(String ids)
    {
        return tBatteryReplacementRecordMapper.deleteTBatteryReplacementRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除车辆电池更换记录信息
     * 
     * @param id 车辆电池更换记录主键
     * @return 结果
     */
    @Override
    public int deleteTBatteryReplacementRecordById(Long id)
    {
        return tBatteryReplacementRecordMapper.deleteTBatteryReplacementRecordById(id);
    }
}
